package com.bifrii.bo;

import java.util.Iterator;
import java.util.List;

import com.bifrii.dao.IUserDAO;
import com.bifrii.dao.JDBCUserDAO;
import com.bifrii.transferObjects.User;
import com.bifrii.transferObjects.Community;
import com.bifrii.transferObjects.Event;

public class UsersManager {
	private static IUserDAO users;
	private static UsersManager um;
	
	public static synchronized UsersManager getInstance(){
		if(um==null){
			um = new UsersManager();
		}
		return um;
	}
	private UsersManager(){
		users= new JDBCUserDAO();
	}
	public List<User> getUsers(){
		return users.selectAllUsers();
	}
	
	public User getUser(String user)
	{
		return users.select(user);
	}
	
	public User getUser(Integer idUser)
	{
		return users.select(idUser);
	}
}
